import { fetch } from '@/axios-config/axios'

interface PropsData {
  params?: any
  data?: any
}

export const getListApi = ({ params }: PropsData): any => {
  return fetch({ url: '/edu/teacher/income/list', method: 'get', params })
}

// 退款
export const delsApi = ({ data }: PropsData): any => {
  return fetch({ url: '/pay', method: 'delete', data })
}

// 统一下单接口
export const setApi = ({ data }: PropsData): any => {
  return fetch({ url: '/pay', method: 'post', data })
}

export const getDetApi = ({ params }: PropsData): any => {
  return fetch({ url:  `/pay/${params.id}`, method: 'get', params })
}

// 支付宝当面付接口
export const getAlipayFacePayOrderApi = ({ params }: PropsData): any => {
  return fetch({ url: `/pay/alipayFacePayOrder/${params.id}`, method: 'get' })
}

// 支付宝网站支付接口
export const nativePayApi = ({ params }: PropsData): any => {
  return fetch({ url: `/pay/alipayPageOrder/${params.id}`, method: 'get'})
}

// 支付宝花呗分期支付接口
export const huaBeiPayApi = ({ params }: PropsData): any => {
  return fetch({ url: `/pay/alipayHuabeiOrder/${params.id}`, method: 'get'})
}
